#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/3/20
# @USER    : Shengji He
# @File    : utils.py
# @Software: PyCharm
# @Version  : Python-
# @TASK:
import time

__all__ = ['timer_decorator']


def timer_decorator(func):
    def wrapper(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        end_time = time.time()
        print(f"'{func.__name__}' cost：{end_time - start_time:.2f} sec")
        return result
    return wrapper
